<include file="public:header" />

<div class="pad_10">
<form action="{:u('nav/edit')}" method="post" name="myform" id="myform" >
<table width="100%" cellpadding="2" cellspacing="1" class="table_form">
	<tr>
      <th></th>
      <td><input type="hidden" name="id" class="input-text" value="{$nav.id}"></td>
    </tr>
	<tr>
        <th>{:L('category')}：</th>
        <td>
        <select name="items_cate_id" style="width:150px;">
              <option value="0" <if condition="$items_cate_info.pid eq 0">selected="selected"</if>>--顶级分类--</option>
               <volist name="items_cate_list" id="val">
              	<option value="{$val.id}" <if condition="$nav.items_cate_id eq $val['id']">selected="selected"</if>>
                	{:str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',$val['level'])}
              		{$val.name}
           		</option>
              </volist>
        </select>
        </td>
     </tr>
	<tr>
      <th width="100">{:L('name')} :</th>
      <td><if condition="$nav['type'] eq '0'">{$nav.name}<else/><input type="text" name="name" id="name" class="input-text" value="{$nav.name}"></if></td>
    </tr>
    <tr>
      <th>{:L('alias')}:</th>
      <td>
      	<if condition="($nav['type'] eq '0') OR ($nav['system'] eq '1')">{$nav.alias}<else/>
		<input type="text" name="alias" id="alias" class="input-text"  value="{$nav.alias}"></if>
	  </td>
    </tr>    
    <tr>
      <th>{:L('type')}:</th>
      <td>
      	 <input type="radio" name="type" value="1" <if condition="$nav.type eq '1'">checked="checked"</if>/>&nbsp;顶部&nbsp;&nbsp;
         <input type="radio" name="type" value="2" <if condition="$nav.type eq '2'">checked="checked"</if>/>&nbsp;底部&nbsp;&nbsp;
      </td>
    </tr>
    <tr>
      <th>{:L('is_show')}:</th>
      <td>
         <input type="radio" name="is_show" value="1" <if condition="$nav.is_show eq '1'">checked="checked"</if>/>&nbsp;显示&nbsp;&nbsp;
         <input type="radio" name="is_show" value="0" <if condition="$nav.is_show eq '0'">checked="checked"</if>/>&nbsp;不显示&nbsp;&nbsp;
      </td>
    </tr>
    <tr>
      <th>{:L('in_site')}:</th>
      <td>
         <input type="radio" name="in_site" onclick="changeData(1);" value="1" <if condition="$nav.in_site eq '1'">checked="checked"</if>  />&nbsp;是&nbsp;&nbsp;
         <input type="radio" name="in_site" onclick="changeData(0);" value="0" <if condition="$nav.in_site eq '0'">checked="checked"</if> />&nbsp;否&nbsp;&nbsp;
      </td>
    </tr>
	<tr id="tr_url" style="<if condition="$nav.in_site eq '1'">display:none;</if>" >
	      <th>{:L('url')}:</th>
	      <td>
	      	<if condition="$nav['type'] eq '0'">{$nav.url}
			
			<else/>
				<input type="text" name="url" id="url" class="input-text" value="{$nav.url}" size="35">
			</if>
		 </td>
    </tr>
    <tr>
      <th width="100">{:L('sort_order')}</th>
      <td><input type="text" name="sort_order" id="sort_order" class="input-text" value="{$nav.sort_order}" onkeyup="value=value.replace(/[^\d]/g,'')"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"></td>
    </tr>
     <tr>
      <th width="100">Title :</th>
      <td><input type="text" name="seo_title" id="seo_title" class="input-text" value="{$nav.seo_title}" size="50"></td>
    </tr>
    <tr>
      <th width="100">Keywords :</th>
      <td><input type="text" name="seo_keys" id="seo_keys" class="input-text" value="{$nav.seo_keys}" size="50"></td>
    </tr>
    <tr>
      <th width="100">Description :</th>
      <td><textarea name="seo_desc" cols="50" rows="3">{$nav.seo_desc}</textarea></td>
    </tr>
</table>
<input type="submit" name="dosubmit" id="dosubmit" class="dialog" value="">
</form>
<script type="text/javascript">
	$(function(){
		$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'250',height:'50'}, function(){this.close();$(obj).focus();})}});
		
		$("#name").formValidator({onshow:"不能为空",onfocus:"不能为空"}).inputValidator({min:1,onerror:"请填写导航名称"});
		$("#alias").formValidator({onshow:"不能为空",onfocus:"不能为空"}).inputValidator({min:1,onerror:"请填写导航别名"});
		//$("#url").formValidator({onshow:"不能为空",onfocus:"不能为空"}).inputValidator({min:1,onerror:"请填写导航RUL"});
	});
	function changeData(type) {		
		var url=$('#tr_url')
		switch (type) {			
			case 1 :				
				url.hide();				
				break;
			case 0 :
				url.show();
			break;
			default:
				url.hide();
		}
	}	
	
</script>
</div>
</body>
</html>